package com.foreknow.dao;

import com.foreknow.model.GuestBook;

import java.sql.SQLException;
import java.util.List;

public interface GuestBookDao {
    /**
     * 添加信息
     * @param gb
     * @return
     */
    public boolean save(GuestBook gb) throws SQLException;

    /**
     * 查询所有信息
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryAll() throws SQLException;

    /**
     * 根据Id查询留言信息
     * @param id
     * @return
     * @throws SQLException
     */
    public GuestBook getQueryById(int id) throws SQLException;

    /**
     * 根据id删除信息
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean deleteById(int id) throws SQLException;
}
